package com.java.star.mall.front.pojo.param;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.*;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 生成预付单的请求参数
 */
@Data
public class AdvancedOrderParam implements Serializable {

    private static final long serialVersionUID = -6375630778826472311L;

    @ApiModelProperty(value = "订单号")
    @NotEmpty(message = "订单号不能为空")
    private String orderSn;

    @ApiModelProperty(value = "应付金额")
    @NotNull(message = "应付金额不能为空")
    @Digits(integer = 10, fraction = 2, message = "请输入最多含有两位小数的金额")
    @DecimalMin(value = "0.01", message = "请输入合法的金额")
    private BigDecimal payAmount;
}
